<?php
/**
 * 会员后台控制器
 * 
 * @version $Id: Exchange.php 351 2012-05-23 02:29:51Z linsir123 $
 */
class controllerExchange extends UserController 
{
	/**
	 * @var 默认的控制器名称
	 */
	public $defaultAction = 'list';
	
	/**
	 * @var 模型
	 */
	public $mExchange;
	
	/**
	 * 构造函数
	 */
	public function __construct()
	{
		parent::__construct();
		
		///
		$this->mExchange = M::exchange();
	}
	
	/**
	 * 提款明细
	 */
	public function actionList()
	{
		$show = 10;
		$params = array();
		if ($count = $this->mExchange->getListCount()) {
			$page = $this->pagination($show, $count, 'exchange/list');
			$list = $this->mExchange->getList(($page-1)*$show, $show);
		}
		
		///
		View::assign('list', $list);
		if (Request::isAjax() && Request::isPost()) 
			View::display('_div_exchange');
		else {
			View::display('exchange');
			View::assign('curMenu', 'exchange');
		}
	}
}
